<%@ page import="kgc.NewsService.NewsService" %>
<%@ page import="kgc.NewsServiceImpl.NewsServiceImpl" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2022/4/6
  Time: 9:23
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
    <%
        int id = Integer.parseInt(request.getParameter("id"));
        int num = Integer.parseInt(request.getParameter("num"));
        NewsService service = new NewsServiceImpl();
        int rows = service.ServiceDeleteById(id, num);
        if(rows>0){
            response.sendRedirect(request.getContextPath()+"/index.jsp");
        }else {
    %>
            <div>删除失败!</div>
        <%
            }

        %>

</body>
</html>
